home *** CD-ROM | disk | FTP | other *** search
- on(keyPress "w"){
- if(0 < mannumber)
- {
- man.gotoandplay("down");
- sound.gotoandplay("up");
- ascore = score;
- tjs = 10;
- while(tjs >= 0)
- {
- if(a[manx][tjs] != 0)
- {
- tt = tjs + 1;
- at = tjs + 1;
- break;
- }
- tjs--;
- }
- if(a[manx][0] == 0)
- {
- tt = 0;
- at = 0;
- }
- i = 0;
- while(i < mannumber)
- {
- if(mancolor == 1)
- {
- duplicateMovieClip("reds","gg" add (tt * 8 + manx),16384 + cheng);
- setProperty("gg" add (tt * 8 + manx), _X, manx * 35 + 35);
- setProperty("gg" add (tt * 8 + manx), _Y, tt * 35 + 55);
- a[manx][tt] = 1;
- }
- else if(mancolor == 2)
- {
- duplicateMovieClip("blues","gg" add (tt * 8 + manx),16384 + cheng);
- setProperty("gg" add (tt * 8 + manx), _X, manx * 35 + 35);
- setProperty("gg" add (tt * 8 + manx), _Y, tt * 35 + 55);
- a[manx][tt] = 2;
- }
- else if(mancolor == 3)
- {
- duplicateMovieClip("greens","gg" add (tt * 8 + manx),16384 + cheng);
- setProperty("gg" add (tt * 8 + manx), _X, manx * 35 + 35);
- setProperty("gg" add (tt * 8 + manx), _Y, tt * 35 + 55);
- a[manx][tt] = 3;
- }
- else if(mancolor == 4)
- {
- duplicateMovieClip("yellows","gg" add (tt * 8 + manx),16384 + cheng);
- setProperty("gg" add (tt * 8 + manx), _X, manx * 35 + 35);
- setProperty("gg" add (tt * 8 + manx), _Y, tt * 35 + 55);
- a[manx][tt] = 4;
- }
- tt += 1;
- cheng += 1;
- if(tt >= 10)
- {
- break;
- }
- i++;
- }
- bloon1 = mannumber == 1 && a[manx][tt - 3] == mancolor && a[manx][tt - 2] == mancolor;
- if(mannumber >= 3 || mannumber == 2 && a[manx][tt - 3] == mancolor || bloon1)
- {
- ii = 1;
- while(ii < 10)
- {
- if(a[manx][tt - ii] != mancolor)
- {
- break;
- }
- this["gg" add ((tt - ii) * 8 + manx)].gotoAndPlay("over");
- score += 10;
- a[manx][tt - ii] = 0;
- che = 1;
- while(8 >= che)
- {
- if(a[manx - che][tt - ii] != mancolor)
- {
- break;
- }
- this["gg" add ((tt - ii) * 8 + manx - che)].gotoAndPlay("over");
- score += 10;
- a[manx - che][tt - ii] = 0;
- si = 1;
- while(11 >= si && a[manx - che][tt - ii + si] != 0)
- {
- this["gg" add ((tt - ii + si) * 8 + manx - che)].gotoAndPlay("down");
- a[manx - che][tt - ii + si] = 0;
- si++;
- }
- che++;
- }
- che = 1;
- while(8 >= che)
- {
- if(a[manx + che][tt - ii] != mancolor)
- {
- break;
- }
- this["gg" add ((tt - ii) * 8 + manx + che)].gotoAndPlay("over");
- score += 10;
- a[manx + che][tt - ii] = 0;
- si = 1;
- while(11 >= si && a[manx + che][tt - ii + si] != 0)
- {
- this["gg" add ((tt - ii + si) * 8 + manx + che)].gotoAndPlay("down");
- a[manx + che][tt - ii + si] = 0;
- si++;
- }
- che++;
- }
- ii++;
- }
- }
- mannumber = 0;
- ascore = score - ascore;
- if(80 * za < score && score < za * 80 + 80 && z[za] != 1)
- {
- sssb();
- char1.gotoandplay("ded");
- z[za] = 1;
- za += 1;
- }
- else if(ascore >= 60)
- {
- score += 30;
- sssb();
- char1.gotoandplay("happy");
- p1k.gotoandplay(2);
- char2.gotoandplay("cry");
- }
- mancolor = 0;
- }
- }
-